#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
using namespace std;
class A {
public:
	A(int a=0) 
		:a(a)
	{
		cout << "A()" << endl;
	}
	~A() {
		cout << "~A()" << endl;
	}
private:
	int a;
};
int main() {
	int* a = new int;
	int* b = new int(1);
	int* c = new int[10];
	int* d = new int[10] {1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
	delete a;
	delete b;
	delete[] c;
	delete[] d;

	A* x = new A(1);
	delete x;

	A* y = (A*)malloc(sizeof(A));
	free(y);
}